Setting Paragraph Style

I want to set the Object text paragraph style based on an attribute...I just do not know the format of the applyTextFormattingToParagraph declaration I assume I would have to use:

I want to change the paragraph style to "Caption" if the Object type attribute is Figure.

Basically I think the DXL would be something like:?

 if (obj."Object Type" "" == "Figure")

o."Object text" = richText (applyTextFormattingToParagraph(richText("Caption"))

I know this is not right, but what is the command to change object test style to what I want?

Thanks


branchwp - Wed Oct 01 12:33:33 EDT 2014

Re: Setting Paragraph Style
llandale - Thu Oct 02 11:58:05 EDT 2014

You are confusing two different types of "formatting":

  • Text attribute formatting; bold, italic etc.
  • Export to MS-Word "Style" formatting, "Caption", "Heading 1".

The "Paragraph Style" attribute is set when you import from Word, and is used by the Export-to-Word utiltiy to assign a "style" in Word after it is exported.  Note that the "Style" must ..err.. should be available when you export; that is what choosing the "Template" file is all about.

So realistically:

  • You create some standard "DOORS Export Template".dotm file
  • Define your standard Styles, "Caption", "Figure", whatever
  • Use that file when Exporting to Word.

-Louie

Re: Setting Paragraph Style
branchwp - Thu Oct 02 13:22:02 EDT 2014

llandale - Thu Oct 02 11:58:05 EDT 2014

You are confusing two different types of "formatting":

  • Text attribute formatting; bold, italic etc.
  • Export to MS-Word "Style" formatting, "Caption", "Heading 1".

The "Paragraph Style" attribute is set when you import from Word, and is used by the Export-to-Word utiltiy to assign a "style" in Word after it is exported.  Note that the "Style" must ..err.. should be available when you export; that is what choosing the "Template" file is all about.

So realistically:

  • You create some standard "DOORS Export Template".dotm file
  • Define your standard Styles, "Caption", "Figure", whatever
  • Use that file when Exporting to Word.

-Louie

I have my MS Word template defined just fine...but I want to change the Text Attribute of the DOORS object to be the same style as I will use in my Word template. I can do this manually thru the TOOLS-SUPPORT TOOLS-EDIT PARAGRAPH STYLE ATTRIBUTE function (change the Object heading to be Object Text and type in the Word Style I want to use.

I just want to know how to envoke that function thru a DXL command...and set the options to be what I want.

 

 

Re: Setting Paragraph Style
tlhIngan - Fri Oct 03 10:21:57 EDT 2014

Have a look at setRichClip. This is a sample from dxl help.

setRichClip richText o."Object Text" 
// with style sheet 
setRichClip(richText o."Object Heading, 
             "Heading 1") 

There is also setRichClip(Buffer/RTF_string__) you can check out.